# FROM openjdk:11-jre
# 开启dump功能
FROM a.watchword.space:55000/base/ibm-semeru-runtimes:open-11-jre
ENV TZ=Asia/Shanghai
# add default ENV
ENV ppostgresql=postgresql
ENV ppostgresport=5432
ENV pgusername=postgres
ENV pgpassword=password
ENV predis=redis
ENV predispassword=
ENV predisport=6379
ENV logginglevel=warn
ENV shiro=true
ENV scpthread=5
ENV ocpthread=5
ENV reportthread=5
ENV dbname=openatc
ENV schema=public
ENV redisdbno=0
ENV jwtToken=kedacom
# todo: duplicate with ENV TZ
ENV pgtimezone=Asia/Shanghai
ENV custommsg=
ENV patterncache=true
ENV timeout=30000
ENV kafkaoneserver=kafka:9092
ENV PUSH_STATUS_PATTERN_KAFKA=false
ENV CORSENABLE=true
ENV TOKEN_EXPIRATION_TIME=3600
ENV QY_KAFKA_SERVERS=kafka:9092
ENV QY_DEVICE_STATUS_REPORT_ENABLE=false
ENV SSLKEY_PATH=classpath:kdstore.p12
ENV SSLKEY_PWD=kedacom123
ENV DATE_TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiSm9obiIsImFkbWluIjp0cnVlLCJleHAiOjQxMDIzMjk2MDAsIm5iZiI6MTczMjk4MjQwMCwiaWF0IjoxNzM0NTkzOTc1fQ.vuYB10NuZiwVYhHHNrBGtTmTUuk0s_kYkQwZSysT4I0

RUN ln -sf /usr/share/zoneinfo/{TZ} /etc/localtime && echo "{TZ}" > /etc/timezone

ADD ./target/openatc-admin.jar /openatc-admin.jar
ENTRYPOINT ["java","-jar","./openatc-admin.jar","--spring.profiles.active=docker"]
# ENTRYPOINT ["java","-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005","-jar","./app.jar","--spring.profiles.active=docker"]




